package com.lei.dao;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @ClassName UserApp
 * @Description TODO
 * @Author Admin
 * @Date 2021/7/13 10:06
 * @Version 1.0
 */
public class UserApp {
    public static void main(String[] args) {
//        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml");
        ApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml");
//        UserDao userDao1 = (UserDao) context.getBean("userDao3");
//        UserDao userDao2 = (UserDao) context.getBean("userDao3");
       // UserDao userDao3 = (UserDao) context.getBean("userDao3");
        UserDao userDao4 = (UserDao) context.getBean("userDao5");
        System.out.println(userDao4);

//        context.close();

//        System.out.println(userDao1);
//        System.out.println(userDao2);
//        System.out.println(userDao2);
//        System.out.println(userDao1==userDao2);
        //userDao.save();



    }
}
